﻿// ******************************************************************************
// Developed by Oguz Demirel
// Date: March 17, 2010
// ******************************************************************************
namespace BulkListActions
{

    // ******************************************************************************
    // Select Items Custom Actions Menu item
    // This class implements 'Enable/Disable item selection' custom action menu item
    // ******************************************************************************
    public class SelectItemsAction : CustomActionBase
    {
        // This method assigns UI related properties for this custom action. 
        // Provide text, image and description for your action here
        public override void SetUIDetails()
        {
            base.Text = "Enable item selection";
            base.ImageUrl = "/_layouts/images/tickoff.jpg";
            base.Description = "Enable the selection of items.";

            // Set this to false, if you want to 
            // execute your custom action w/o asking
            // user for confirmation
            base.askForConfirmation = false;
        }
    } // end - class SelectItemsAction

    // ******************************************************************************
    // Delete Items Custom Actions Menu item
    // This class implements 'Delete Items' custom action menu item
    // ******************************************************************************
    public class DeleteItemsAction : CustomActionBase
    {
        // This method assigns UI related properties for this custom action. 
        // Provide text, image and description for your action here
        public override void SetUIDetails()
        {
            // Custom Action Title
            base.Text = "Delete";
            // Icon for your custom action
            base.ImageUrl = "/_layouts/images/DELITEM.GIF";
            // Custom Action Description
            base.Description = "Delete selected items.";
            
            // Handler file name is the name of ashx file 
            // which implements web handler for your custom action
            base.handlerFileName = "DeleteItems.ashx";

            // Action name provided here will be shown 
            // in client side confirmation message. 
            // e.g. "Are you sure you want to 'delete' selected item(s)?"
            base.actionName = "delete";
        }
    } // end - class DeleteItemsAction

    // ******************************************************************************
    // CheckOut Items Custom Actions Menu item
    // This class implements 'CheckOut Items' custom action menu item
    // ******************************************************************************
    public class CheckOutItemsAction : CustomActionBase
    {
        // This method assigns UI related properties for this custom action. 
        // Provide text, image and description for your action here
        public override void SetUIDetails()
        {
            // Custom Action Title
            base.Text = "Check Out";
            // Icon for your custom action
            base.ImageUrl = "/_layouts/images/CHECKOUT.GIF";
            // Custom Action Description
            base.Description = "Check out selected items.";

            // Handler file name is the name of ashx file 
            // which implements web handler for your custom action
            base.handlerFileName = "CheckOutItems.ashx";

            // Action name provided here will be shown 
            // in client side confirmation message. 
            // e.g. "Are you sure you want to 'check out' selected item(s)?"
            base.actionName = "check out";
        }
    } // end - class CheckOutItemsAction

    // ******************************************************************************
    // CheckIn Items Custom Actions Menu item
    // This class implements 'CheckIn Items' custom action menu item
    // ******************************************************************************
    public class CheckInItemsAction : CustomActionBase
    {
        // This method assigns UI related properties for this custom action. 
        // Provide text, image and description for your action here
        public override void SetUIDetails()
        {
            // Custom Action Title
            base.Text = "Check In";
            // Icon for your custom action
            base.ImageUrl = "/_layouts/images/CHECKIN.GIF";
            // Custom Action Description
            base.Description = "Check in selected items.";

            // Handler file name is the name of ashx file 
            // which implements web handler for your custom action
            base.handlerFileName = "CheckInItems.ashx";

            // Action name provided here will be shown 
            // in client side confirmation message. 
            // e.g. "Are you sure you want to 'check in' selected item(s)?"
            base.actionName = "check in";
        }
    } // end - class CheckInItemsAction

    // ******************************************************************************
    // Publish Items Custom Actions Menu item
    // This class implements 'Publish Items' custom action menu item
    // ******************************************************************************
    public class PublishItemsAction : CustomActionBase
    {
        // This method assigns UI related properties for this custom action. 
        // Provide text, image and description for your action here
        public override void SetUIDetails()
        {
            // Custom Action Title
            base.Text = "Publish a Major Version";
            // Icon for your custom action
            base.ImageUrl = "/_layouts/images/PUBMAJOR.GIF";
            // Custom Action Description
            base.Description = "Publish a major version of selected items.";

            // Handler file name is the name of ashx file 
            // which implements web handler for your custom action
            base.handlerFileName = "PublishItems.ashx";

            // Action name provided here will be shown 
            // in client side confirmation message. 
            // e.g. "Are you sure you want to 'check in' selected item(s)?"
            base.actionName = "publish a major version of";
        }
    } // end - class PublishItemsAction

    // ******************************************************************************
    // Unpublish Items Custom Actions Menu item
    // This class implements 'Unpublish Items' custom action menu item
    // ******************************************************************************
    public class UnpublishItemsAction : CustomActionBase
    {
        // This method assigns UI related properties for this custom action. 
        // Provide text, image and description for your action here
        public override void SetUIDetails()
        {
            // Custom Action Title
            base.Text = "Unpublish this version";
            // Icon for your custom action
            base.ImageUrl = "/_layouts/images/UNPUB.GIF";
            // Custom Action Description
            base.Description = "Unpublish current versions of selected items.";

            // Handler file name is the name of ashx file 
            // which implements web handler for your custom action
            base.handlerFileName = "UnpublishItems.ashx";

            // Action name provided here will be shown 
            // in client side confirmation message. 
            // e.g. "Are you sure you want to 'check in' selected item(s)?"
            base.actionName = "unpublish";
        }
    } // end - class UnpublishItemsAction

    // ******************************************************************************
    // Update MetaData Custom Actions Menu item
    // This class implements 'Update MetaData' custom action menu item
    // ******************************************************************************
    public class UpdateMetaDataAction : CustomActionBase
    {
        // This method assigns UI related properties for this custom action. 
        // Provide text, image and description for your action here
        public override void SetUIDetails()
        {
            // Custom Action Title
            base.Text = "Update metadata";
            // Icon for your custom action
            base.ImageUrl = "/_layouts/images/metadataupdate.jpg";
            // Custom Action Description
            base.Description = "Update metadata of selected items.";

            // Handler file name is the name of ashx file 
            // which implements web handler for your custom action
            base.handlerFileName = "UpdateMetaData.ashx";

            // Action name provided here will be shown 
            // in client side confirmation message. 
            // e.g. "Are you sure you want to 'update metadata of' selected item(s)?"
            base.actionName = "update metadata of";
        }
    } // end - class UnpublishItemsAction

    // ******************************************************************************
    // Move Custom Actions Menu item
    // This class implements 'Move' custom action menu item
    // ******************************************************************************
    public class MoveItemsAction : CustomActionBase
    {
        // This method assigns UI related properties for this custom action. 
        // Provide text, image and description for your action here
        public override void SetUIDetails()
        {
            // Custom Action Title
            base.Text = "Move";
            // Icon for your custom action
            base.ImageUrl = "/_layouts/images/sendOtherLoc.gif";
            // Custom Action Description
            base.Description = "Move selected items.";

            // Handler file name is the name of ashx file 
            // which implements web handler for your custom action
            base.handlerFileName = "MoveItems.ashx";

            // Action name provided here will be shown 
            // in client side confirmation message. 
            // e.g. "Are you sure you want to 'move' selected item(s)?"
            base.actionName = "move";
        }
    } // end - class MoveItemsAction

} // end - namespace BulkListActions
